package org.jackysoft.interceptor;

import java.lang.reflect.Method;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.jackysoft.annotations.ActionRequestMethod;
import org.jackysoft.annotations.MethodInceptor;
import org.springframework.web.servlet.ModelAndView;

@MethodInceptor(method = ActionRequestMethod.removes)
public class RemovesInterceptor extends AbstractInterceptor {

	@Override
	public void postHandle(HttpServletRequest request,
			HttpServletResponse response, Object handler,
			ModelAndView modelAndView) throws Exception {

		Method serviceRemoveBean = service.getClass().getMethod("remove",
				java.util.Collection.class);
		serviceRemoveBean.invoke(service, beans);

	}
}
